<?php

namespace App\Http\Resources;

use App\Model\BankCard;
use Illuminate\Http\Resources\Json\Resource;

class WithdrawShowResource extends Resource
{
    public function toArray($request)
    {
        return [
            'id'           => $this->id,
            'number'       => $this->number,
            'bank_card_id' => $this->bank_card_id,
            'bank_number'  => BankCard::find($this->bank_card_id)->number,
            'type'         => $this->type,
            'status'       => $this->status,
            'created_at'   => $this->created_at,
        ];
    }
}